home *** CD-ROM | disk | FTP | other *** search
/ Enter 2003 March / EnterCD 03_2003.iso / Multimedia / IntelliCAD 2001 3.3 / data1.cab / API / sds / sds.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-01-05  |  46.5 KB  |  1,106 lines

  1. /*    C:\DEV\LIB\SDS\SDS.H - SDS Api defines and structures.
  2.  *    Copyright (C) 1997-1998 Visio Corporation. All rights reserved.
  3.  *
  4.  *    Abstract
  5.  *  This header file ships with the product. Third party developers
  6.  *  need this with the sds.lib to create external sds applications.
  7.  *
  8.  *    $Revision: 1.6 $ $Date: 2001/08/23 03:09:54 $
  9.  *
  10.  */
  11.  
  12.  
  13. #pragma once
  14. #ifndef _SDS_H
  15. #define _SDS_H
  16.  
  17. // Includes
  18. #ifndef _INC_STDLIB
  19.     #include <stdlib.h>
  20. #endif
  21.  
  22. #if defined(__cplusplus)
  23. #ifndef    EXTERN_C
  24.     #define EXTERN_C    extern "C"
  25. #endif
  26.     extern "C"
  27.     {
  28. #endif
  29.  
  30. #ifndef    EXTERN_C
  31.     #define EXTERN_C
  32. #endif
  33.  
  34. /* The following defines are for compatibility only. */
  35. #define adsart(a)  short code=(a)
  36. #define _(a)       a
  37.  
  38.  
  39. typedef double                sds_real;
  40. typedef sds_real            sds_point[3];
  41. typedef long                sds_name[2];
  42. typedef sds_real            sds_matrix[4][4];
  43. typedef sds_real            *sds_pointp;
  44. typedef long                *sds_namep;
  45. typedef struct _sds_hdlg    *sds_hdlg;
  46. typedef struct _sds_htile    *sds_htile;
  47.  
  48. typedef struct {
  49.     sds_hdlg  dialog;
  50.     sds_htile tile;
  51.     char*     value;
  52.     void*     client_data;
  53.     int       reason;
  54.     long      x, y;
  55. } sds_callback_packet;
  56.  
  57. struct sds_binary {
  58.     short clen;
  59.     char *buf;
  60. };
  61.  
  62. union sds_u_val {
  63.    sds_real rreal;
  64.    sds_real rpoint[3];
  65.    short rint;
  66.    char *rstring;
  67.    long rlname[2];
  68.    long rlong;
  69.    struct sds_binary rbinary;
  70. };
  71.  
  72. struct sds_resbuf {
  73.     struct sds_resbuf *rbnext;
  74.     short restype;
  75.     union sds_u_val resval;
  76. };
  77.  
  78. struct sds_dobjll {
  79.     char         type;
  80.     short        color;
  81.     short        npts;
  82.     sds_real    *chain;
  83.     struct sds_dobjll *next;
  84. };
  85.  
  86. struct sds_blockTree {
  87. struct    sds_blockTree *p_next,*p_contents;
  88. //    sds_name ename;
  89.     char *name;        // block name
  90.     char *path;        // NULL for block, saved file name for xref
  91.     sds_name entity_name    // entity's SDS internal name
  92.             ,tblrec_name;    // The record's SDS internal name in block table 
  93.     int type;
  94.     void *bitmap,*wmf;    // bitmap & WMF image buffer
  95.     int bmpsz,wmfsz;    // bitmap & WMF buffer size
  96.     void *p_hook;        /* The hook for adding expanded data to instances of this structure.
  97.                            Isn't used by SDS functions. You can use it at own discretion.
  98.                            Is initialized as NULL.  
  99.                            (!) sds_relBlockTree() will not delete p_hook.  
  100.                         */
  101. };
  102.  
  103. #define SDS_X             0
  104. #define SDS_Y             1
  105. #define SDS_Z             2
  106. #define SDS_T             3
  107.  
  108. #define SDS_TRUE          1
  109. #define SDS_FALSE         0
  110.  
  111. #define SDS_PAUSE         "\\"
  112.  
  113. #define SDS_RSG_NONULL    0x01
  114. #define SDS_RSG_NOZERO    0x02
  115. #define SDS_RSG_NONEG     0x04
  116. #define SDS_RSG_NOLIM     0x08
  117. #define SDS_RSG_GETZ      0x10
  118. #define SDS_RSG_DASH      0x20
  119. #define SDS_RSG_2D        0x40
  120. #define SDS_RSG_OTHER     0x80
  121. #define SDS_RSG_NOPMENU   0x100
  122. #define SDS_RSG_NOCANCEL  0x200
  123. #define SDS_RSG_NOVIEWCHG 0x400
  124. #define SDS_RSG_NODOCCHG  0x800
  125.  
  126. #define SDS_RQSAVE        14
  127. #define SDS_RQEND         15
  128. #define SDS_RQQUIT        16
  129. #define SDS_RQCFG         22
  130. #define SDS_RQXLOAD       100
  131. #define SDS_RQXUNLD       101
  132. #define SDS_RQSUBR        102
  133. #define SDS_RQHUP         105
  134. #define SDS_RQXHELP       118
  135.  
  136. #define SDS_RSRSLT        1
  137. #define SDS_RSERR         3
  138. #define SDS_RTERROR       -5001
  139. #define SDS_RTCAN         -5002
  140. #define SDS_RTREJ         -5003
  141. #define SDS_RTFAIL        -5004
  142. #define SDS_RTKWORD       -5005
  143. #define SDS_RTNONE        5000
  144. #define SDS_RTREAL        5001
  145. #define SDS_RTPOINT       5002
  146. #define SDS_RTSHORT       5003
  147. #define SDS_RTANG         5004
  148. #define SDS_RTSTR         5005
  149. #define SDS_RTENAME       5006
  150. #define SDS_RTPICKS       5007
  151. #define SDS_RTORINT       5008
  152. #define SDS_RT3DPOINT     5009
  153. #define SDS_RTLONG        5010
  154. #define SDS_RTVOID        5014
  155. #define SDS_RTLB          5016
  156. #define SDS_RTLE          5017
  157. #define SDS_RTDOTE        5018
  158. #define SDS_RTNIL         5019
  159. #define SDS_RTDXF0        5020
  160. #define SDS_RTT           5021
  161. #define SDS_RTNORM        5100
  162. #define SDS_RTBINARY      5022
  163.  
  164. #define COND_OP_CODE        -4
  165.  
  166. #define SDS_RTDRAGPT      5500
  167.  
  168. #define SDS_CBR_SELECT       1
  169. #define SDS_CBR_LOST_FOCUS   2
  170. #define SDS_CBR_DRAG         3
  171. #define SDS_CBR_DOUBLE_CLICK 4
  172.  
  173. #define SDS_DLGALLDONE   -1
  174. #define SDS_DLGCANCEL     0
  175. #define SDS_DLGOK         1
  176. #define SDS_DLGSTATUS     2
  177.  
  178. #define SDS_BGLCOLOR      -2
  179. #define SDS_DBGLCOLOR     -15
  180. #define SDS_DFGLCOLOR     -16
  181. #define SDS_LINELCOLOR    -18
  182.  
  183. #define SDS_LIST_CHANGE   1
  184. #define SDS_LIST_APPEND   2
  185. #define SDS_LIST_NEW      3
  186.  
  187. /*================================
  188.      SDS xref actions 0 - 16
  189.  ================================*/
  190. #define SDS_XREF_FIND        0
  191. #define SDS_XREF_ATTACH     1     
  192. #define SDS_XREF_INSERT     2                                                             
  193. #define SDS_XREF_EDIT_PATH    3
  194. #define SDS_XREF_RELOAD        4     
  195. #define SDS_XREF_UNLOAD        5     
  196. #define SDS_XREF_DETACH        6
  197. #define SDS_XREF_RENAME        7
  198. /*================================
  199.      SDS xref action flags
  200.  ================================*/    
  201. #define SDS_XREF_OVERLAY    0x10
  202. #define SDS_XREF_CROP_PATH    0x20
  203. #define SDS_XREF_BIND        0x40
  204. #define SDS_XREF_USERDEF    0x80    
  205.     
  206. /*=======================================================================
  207.     sds_xref(action,param) 
  208.     actions:
  209.     -----------------
  210.     SDS_XREF_FIND        Inquiry to the user for xref search. 
  211.                         On input :
  212.                             Can be combined with "SDS_XREF_OVERLAY" flag
  213.                             (by default will be request 
  214.                                 for the attachment file)
  215.                             Can be combined with "SDS_XREF_USERDEF" flag.
  216.                             In a this case if 'param->restype' is "RTSTR"
  217.                             then dialog title will present as 
  218.                             'param->resval.rstring' string.
  219.                         On exit: 
  220.                         In param->resval.rstring will be returned path.
  221.     ---------------------------------------------------------------------
  222.     SDS_XREF_ATTACH        
  223.                     On input:
  224.                         Can be combined with the flags "SDS_XREF_OVERLAY" 
  225.                         (In this case the file will be attached as overlay)
  226.                         and "SDS_XREF_CROP_PATH" (the xref will be kept 
  227.                         with file name only, without full path)                    
  228.                         
  229.                     Remark:
  230.                         In this action "param" contains those parameters 
  231.                             (for example rotate angle, original point etc.), 
  232.                          which will not be requested from the user.
  233.                             The DXF-codes may be next:
  234.                          10 - insertion point,    41,42,43 - x,y,z scales 
  235.                          50 - rotation,            1 - path,    2 - name
  236.     ---------------------------------------------------------------------    
  237.     SDS_XREF_INSERT        In this actions "param" contains xref names list
  238.     SDS_XREF_RELOAD                    (DXF code 2 or SDS code RTSTR)
  239.     SDS_XREF_UNLOAD            
  240.     SDS_XREF_DETACH
  241.                     Remark:
  242.                         SDS_XREF_INSERT can be combined  
  243.                         with "SDS_XREF_BIND"
  244.     ---------------------------------------------------------------------
  245.     SDS_XREF_EDIT_PATH     
  246.                         On input:
  247.                             Can be combined with "SDS_XREF_CROP_PATH" flag
  248.                             (will be kept the file name only,
  249.                                 without fully path)
  250.                         Remark:
  251.                             In this action "param" contains  
  252.                             xref name pattern    (DXF code 2) 
  253.                             and new path        (DXF code 1)
  254.     ---------------------------------------------------------------------
  255.     SDS_XREF_RENAME
  256.                         On input:
  257.                             For this action "param" contains  
  258.                                 xref name             (DXF code 2) 
  259.                                 and xref new name    (DXF code RTSTR)
  260. ========================================================================*/
  261.  
  262.  
  263. //********************************
  264. // SDS callback flags
  265. //********************************
  266.  
  267. // Command Start/End.
  268. #define SDS_CBCMDBEGIN        0  // arg1="command name"     cast as (char *)
  269.                                  // Callback return  RTERROR will cause command to not be called.
  270. #define SDS_CBCMDEND          1     // arg1="command name"     cast as (char *)
  271.                                  // Return code does not matter.
  272.  
  273. // Mouse movements and Mouse buttons.
  274. #define SDS_CBMOUSEMOVE       2     // arg1=X pixel  arg2=Y pixel
  275. #define SDS_CBLBUTTONDN       3     // arg1=X pixel  arg2=Y pixel
  276. #define SDS_CBLBUTTONUP       4     // arg1=X pixel  arg2=Y pixel
  277. #define SDS_CBLBUTTONDBLCLK   5     // arg1=X pixel  arg2=Y pixel
  278. #define SDS_CBRBUTTONDN       6     // arg1=X pixel  arg2=Y pixel
  279. #define SDS_CBRBUTTONUP       7     // arg1=X pixel  arg2=Y pixel
  280. #define SDS_CBRBUTTONDBLCLK  41  // arg1=X pixel  arg2=Y pixel // SMC(Maeda)
  281. #define SDS_CBMBUTTONDN      35  // arg1=X pixel  arg2=Y pixel // SMC(Maeda)
  282. #define SDS_CBMBUTTONUP      36  // arg1=X pixel  arg2=Y pixel // SMC(Maeda)
  283. #define SDS_CBMBUTTONDBLCLK  39  // arg1=X pixel  arg2=Y pixel // SMC(Maeda)
  284.                                  // Callback return  RTERROR will cause point to be ignored.
  285.                                  // Cast arg1 and arg2 as (int*)
  286.  
  287. // Transforming a Selection Set.
  288. #define SDS_CBXFORMSS         8     // arg1=Selection set (ok to modify) cast as (sds_name)
  289.                                  // arg2=Transformation Matrix (ok to modify) cast as (sds_matrix)
  290.                                  // Callback return RTERROR will stop the transformation.
  291.  
  292. // Undo/Redo.
  293. #define SDS_CBENTUNDO         9     // arg1=Entname (ok to modify)    cast as (sds_name), arg2 below defines on undo type
  294.                                  // Callback return RTERROR will stop UNDO for this ent.
  295. #define SDS_CBENTREDO        10     // arg1=Entname (ok to modify)     cast as (sds_name), arg2 below defines on undo type
  296.                                  // Callback return RTERROR will stop REDO for this ent.
  297.  
  298. // Undo/Redo constants - Passed back as arg2 parameter so the user can tell what action is being undone.
  299. #define SDS_ADD_NOTICE        1
  300. #define SDS_MODIFY_NOTICE    2
  301. #define SDS_DELETE_NOTICE    3
  302.  
  303. // Palette Change.
  304. #define SDS_CBPALETTECHG     11     // arg1=HPALETTE cast as (HPALETTE)
  305.  
  306. // Open/Close/New/Save on documents.
  307. #define SDS_CBOPENDOC        12     // arg1=file name, cast as (char *)
  308. #define SDS_CBNEWDOC         13     // (all args NULL)
  309. #define SDS_CBCLOSEDOC       14     // arg1=file name, cast as (char *)
  310. #define SDS_CBSAVEDOC        15     // arg1= new file name, cast as (char *)
  311.                                  // arg2= old file name, cast as (char *)
  312.  
  313. // !!! See new callback SDS_CBDOCCHG below for better MDI control
  314. // Doc/View change (when the user activates a new MDI window).
  315. #define SDS_CBVIEWDOCCHG     16     // arg1=file name, cast as (char *)
  316.                                  // arg2=current window HWND, cast as (HWND)
  317.  
  318. // Changes to documents.
  319. #define SDS_CBENTDEL         17     // arg1=Entname to be deleted (or undeleted), cast as (sds_name)
  320.                                  // Callback return RTERROR will stop sds_entdel() for this ent.
  321. #define SDS_CBENTMAKE        18     // arg1=Entname of new entity, cast as (sds_name)
  322. #define SDS_CBENTMOD         19     // arg1=Entname of modified entity, cast as (sds_name)
  323.  
  324. // Grip edits.
  325. #define SDS_CBGRIPEDITBEG    20     // arg1=Entname being edited, cast as (sds_name)
  326.                                  // arg2=Point being edited, cast as (sds_point)
  327.                                  // Callback return RTERROR will stop grip edit.
  328. #define SDS_CBGRIPEDITEND    21     // arg1=Entname of entity that was edited, cast as (sds_name)
  329.                                  // arg2=Point being edited, cast as (sds_point)
  330.  
  331. #define SDS_CBVIEWCHANGE     22     // arg1=type of paint 
  332.                                  // 1=redraw, 2=shade, 3=hide, 4=view change (zoom, vpoint, etc.) 5=regen
  333.                                  // 
  334. // Mouse movements and Mouse buttons returning current UCS cordinates
  335. // Callback return  RTERROR will cause point to be ignored.
  336. #define SDS_CBMOUSEMOVEUCS       23  // arg1=X coord  arg2=Y coord arg3=Z coord
  337. #define SDS_CBLBUTTONDNUCS       24     // arg1=X coord  arg2=Y coord arg3=Z coord
  338. #define SDS_CBLBUTTONUPUCS       25     // arg1=X coord  arg2=Y coord arg3=Z coord
  339. #define SDS_CBLBUTTONDBLCLKUCS   26     // arg1=X coord  arg2=Y coord arg3=Z coord
  340. #define SDS_CBRBUTTONDNUCS       27     // arg1=X coord  arg2=Y coord arg3=Z coord
  341. #define SDS_CBRBUTTONUPUCS       28     // arg1=X coord  arg2=Y coord arg3=Z coord
  342. #define SDS_CBRBUTTONDBLCLKUCS   42  // arg1=X coord  arg2=Y coord arg3=Z coord    // SMC(Maeda)
  343. #define SDS_CBMBUTTONDNUCS       37  // arg1=X coord  arg2=Y coord arg3=Z coord    // SMC(Maeda)
  344. #define SDS_CBMBUTTONUPUCS       38  // arg1=X coord  arg2=Y coord arg3=Z coord    // SMC(Maeda)
  345. #define SDS_CBMBUTTONDBLCLKUCS   40  // arg1=X coord  arg2=Y coord arg3=Z coord    // SMC(Maeda)
  346.  
  347.                                  // Cast arg1 and arg2 and arg3 as (double)
  348.  
  349. // Callbacks associated with painting and dragging
  350. #define SDS_CBBEGINPAINT         29  // no arguments
  351. #define SDS_CBENDPAINT             30  // no arguments
  352. #define SDS_CBENDMOUSEMOVE         31  // arg1=X coord  arg2=Y coord arg3 = is Dragging flag 
  353.                                  // Cast arg1 and arg2 as (int*) cast arg3 as bool
  354.  
  355. // Doc change (when the user activates a new MDI window).
  356. #define SDS_CBDOCCHG            32     // arg1=new file name, cast as (char *)
  357.                                       // arg2=new window, cast as HWND
  358.                                      // arg3=old window, cast as HWND 
  359.  
  360. // Callbacks associated with cloning
  361. #define SDS_CBBEGINCLONE        33    // arg1=selection set of the entities to be processed by sds-apps
  362.  
  363. #define SDS_CBENDCLONE            34    // arg1=selection set of the entities the cloning was performed from 
  364.                         // arg2=selection set of created objects or entity name of created block
  365.                         // arg3=mode(0 - arg2=selection set, 1 - agr2=block entity name)
  366.  
  367.  
  368. //*****************************
  369. // end SDS callback flags
  370. //*****************************
  371.  
  372. #define SDS_MODE_ENABLE   0
  373. #define SDS_MODE_DISABLE  1
  374. #define SDS_MODE_SETFOCUS 2
  375. #define SDS_MODE_SETSEL   3
  376. #define SDS_MODE_FLIP     4
  377.  
  378. #define SDS_MAX_TILE_STR   40
  379. #define SDS_TILE_STR_LIMIT 255       
  380.  
  381. #define sds_name_set(nmFrom, nmTo)                (*(nmTo)=*(nmFrom),(nmTo)[1]=(nmFrom)[1])
  382. #define sds_point_set(ptFrom, ptTo)                (*(ptTo)=*(ptFrom),(ptTo)[1]=(ptFrom)[1],(ptTo)[2]=(ptFrom)[2])
  383. #define sds_name_clear(nmAnyName)                 nmAnyName[0]=nmAnyName[1]=0
  384. #define sds_name_nil(nmAnyName)                    (nmAnyName[0]==0 && nmAnyName[1]==0)
  385. #define sds_name_equal(nmNameOne, nmNameTwo)    (nmNameOne[0]==nmNameTwo[0] && nmNameOne[1]==nmNameTwo[1])
  386.  
  387. // The following naming convention is being used here for variables in the prototypes:     (Mostly from "Programming Windows, by Charles Petzold)
  388. //
  389. //_Abbrev____Type_______________Example:__________________________________________________________________________________________________________
  390. //
  391. //       sw -- Switch (int)        int swExitMode        Note:  Use for any int that will only be zero or non-zero (not for Booleans, they would be "b")
  392. //       bs -- Bitset (int)        int bsAllowed        Note:  Use for any int variable containing a bitset
  393. //        n -- Int or Short        int nRType                
  394. //        d -- Double                double dAngle
  395. //        l -- Long                long lSetIndex
  396. //       pt -- sds_point            const sds_point ptFrom
  397. //       sz -- Pointer to a null-terminated string    const char *szAlertMsg    
  398. //        p -- Pointer            const void *pFirstPoint   (also, combines with any other, such as: double *pdRadians)
  399. //       rb -- sds_resbuf            const struct sds_resbuf *prbCmdList
  400. //       nm -- sds_name            const sds_name nmNextEnt
  401. //       mx -- sds_matrix            sds_matrix mxECStoWCS
  402. //   size -- size_t                size_t sizeBytesEach
  403. //________________________________________________________________________________________________________________________________________________
  404.  
  405. /* SDS protos for functions. */
  406.  
  407.  
  408. #if defined(_WINDOWS_)
  409.     HDC *sds_getviewhdc(void);
  410.     int sds_getrgbvalue(int nColor);
  411.     HPALETTE sds_getpalette(void);
  412.     HWND sds_getviewhwnd(void); 
  413.     HWND sds_getmainhwnd(void); 
  414.     int sds_drawLinePattern(HDC h_dc, RECT rect, struct sds_resbuf *lineParam);
  415.  
  416. #endif
  417.  
  418. int SDS_main(int nARGC, char *nARGV[]);
  419.  
  420. void               sds_abort(const char *szAbortMsg);
  421. void               sds_abortintellicad(void);    
  422. int                   sds_agetcfg(const char *szSymbol, char  *szVariable);   // Not documented
  423. int                   sds_agetenv(const char *szSymbol, char  *szVariable);   // Not documented
  424. int                   sds_alert(const char *szAlertMsg);
  425. double             sds_angle(const sds_point ptStart, const sds_point ptEnd);
  426. int                sds_angtof(const char *szAngle, int nUnitType, double *pdAngle);
  427. int                   sds_angtof_absolute(const char *szAngle, int nUnitType, double *pdAngle);
  428. int                sds_angtos(double dAngle, int nUnitType, int nPrecision, char *szAngle);
  429. int                sds_angtos_end(double dAngle, int nUnitType, int nPrecision, char *szAngle);
  430. int                sds_angtos_convert(int ignoremode, double dAngle, int nUnitType, int nPrecision, char *szAngle);
  431. int                sds_angtos_dim(int ignoremode, double dAngle, int nUnitType, int nPrecision, char *szAngle);
  432. int                   sds_angtos_absolute(double dAngle, int nUnitType, int nPrecision, char *szAngle);
  433. int                   sds_arxload(const char *szARXProgram);
  434. struct sds_resbuf *sds_arxloaded(void);
  435. int                   sds_arxunload(const char *szARXProgram);
  436. int                sds_asetcfg(const char *szSymbol, const char *szValue);   // Not documented
  437. int                   sds_asetenv(const char *szSymbol, const char *szValue);   // Not documented
  438.  
  439. struct sds_resbuf *sds_buildlist(int nRType, ...);
  440. struct sds_blockTree *sds_buildBlockTree(int type_mask);
  441. int                sds_callinmainthread(int (*fnDragEnts)(void *),void *pUserData);
  442. void              *sds_calloc(size_t sizeHowMany, size_t sizeBytesEach);
  443.  
  444. int                sds_cmd(const struct sds_resbuf *prbCmdList);
  445. int                sds_command(int nRType, ...);
  446. int                sds_cvunit(double dOldNum, const char *szOldUnit, const char *szNewUnit, double *pdNewNum);
  447.  
  448. int                sds_defun(const char *szFuncName, int nFuncCode);    
  449. int                   sds_dictadd(const sds_name nmDict, const char *szAddThis, const sds_name nmNonGraph);  // ??
  450. int                   sds_dictdel(const sds_name nmDict, const char *szDelThis);
  451. struct sds_resbuf *sds_dictnext(const sds_name nmDict, int swFirst);
  452. int                   sds_dictrename(const sds_name nmDict, const char *szOldName, const char *szNewName);
  453. struct sds_resbuf *sds_dictsearch(const sds_name nmDict, const char *szFindThis, int swFirst);
  454. double               sds_distance(const sds_point ptFrom, const sds_point ptTo);
  455. struct sds_dobjll *sds_dispobjs(const sds_name nmEntity,int nDispMode);
  456. int                sds_distof(const char *szDistance, int nUnitType, double *pdDistance);
  457. int                sds_draggen(const sds_name nmSelSet, const char *szDragMsg, int nCursor, int (*fnDragEnts)(sds_point ptCursorLoc, sds_matrix mxTransform), sds_point ptDestPoint);    //TODO
  458.  
  459. int                sds_entdel(const sds_name nmEntity);
  460. struct sds_resbuf *sds_entget(const sds_name nmEntity);
  461. struct sds_resbuf *sds_entgetx(const sds_name nmEntity, const struct sds_resbuf *prbAppList);
  462. int                sds_entlast(sds_name nmLastEnt);
  463. int                sds_entmake(const struct sds_resbuf *prbEntList);
  464. int                   sds_entmakex(const struct sds_resbuf *prbEntList, sds_name nmNewEnt);
  465. int                sds_entmod(const struct sds_resbuf *prbEntList);
  466. int                sds_entnext(const sds_name nmKnownEnt, sds_name nmNextEnt);
  467. int                sds_entsel(const char *szSelectMsg, sds_name nmEntity, sds_point ptSelected);
  468. int                sds_entupd(const sds_name nmEntity);
  469. void               sds_exit(int swAbnormalExit);
  470.  
  471. void               sds_fail(const char *szFailMsg);
  472. int                sds_findfile(const char *szLookFor, char *szPathFound);
  473. void               sds_free(void *pMemLoc);    
  474. void               sds_freedispobjs(struct sds_dobjll *pDispObjs);
  475.  
  476. int                sds_getangle(const sds_point ptStart, const char *szAngleMsg, double *pdRadians);
  477. char              *sds_getappname(void);
  478. struct sds_resbuf *sds_getargs(void);
  479. int                   sds_getcfg(const char *szSymbol, char  *szVariable, int nLength);  
  480. int                sds_getcname(const char *szOtherLang, char **pszEnglish);
  481. int                sds_getcorner(const sds_point ptStart, const char *szCornerMsg, sds_point ptOpposite);
  482. int                sds_getdist(const sds_point ptStart, const char *szDistMsg, double *pdDistance);
  483. struct sds_resbuf *sds_getdoclist(void);
  484. int                sds_getfiled(const char *szTitle, const char *szDefaultPath, const char *szExtension, int bsOptions, struct sds_resbuf *prbFileName);
  485. int                sds_getfuncode(void);
  486. int                sds_getinput(char *szEntry);
  487. int                sds_getint(const char *szIntMsg, int *pnInteger);
  488. int                sds_getkword(const char *szKWordMsg, char *szKWord);
  489. int                sds_getorient(const sds_point ptStart, const char *szOrientMsg, double *pdRadians);
  490. int                sds_getpoint(const sds_point ptReference, const char *szPointMsg, sds_point ptPoint);
  491. int                sds_getreal(const char *szRealMsg, double *pdReal);
  492. int                sds_getstring(int swSpaces, const char *szStringMsg, char *szString);
  493. int                sds_getsym(const char *szSymbol, struct sds_resbuf **pprbSymbolInfo);
  494. int                sds_gettbpos(const char *pToolBarName, sds_point ptTbPos);
  495. int                sds_getvar(const char *szSysVar, struct sds_resbuf *prbVarInfo);
  496. int                sds_graphscr(void);
  497. int                sds_grclear(void);
  498. int                   sds_grarc(const sds_point ptCenter, double dRadius, double dStartAngle, double dEndAngle, int nColor, int swHighlight);
  499. int                   sds_grfill(const sds_point *pptPoints, int nNumPoints, int nColor, int swHighlight);
  500. int                sds_grdraw(const sds_point ptFrom, const sds_point ptTo, int nColor, int swHighlight);
  501. int                sds_grread(int bsAllowed, int *pnInputType, struct sds_resbuf *prbInputValue);
  502. int                sds_grtext(int nWhere, const char *szTextMsg, int swHighlight);
  503. int                sds_grvecs(const struct sds_resbuf *prbVectList, sds_matrix mxDispTrans);
  504.  
  505. int                sds_handent(const char *szEntHandle, sds_name nmEntity);
  506. int                sds_help(char *szHelpFile, char *szContextID, int nMapNumber);
  507.  
  508. int                sds_init(int nARGC, char *nARGV[]);
  509. int                sds_initget(int bsAllowed, const char *szKeyWordList);
  510. int                sds_inters(const sds_point ptFrom1, const sds_point ptTo1, const sds_point ptFrom2, const sds_point ptTo2, int swFinite, sds_point ptIntersection);
  511. int                sds_invoke(const struct sds_resbuf *prbArguments,    struct sds_resbuf **pprbReturn);
  512. int                sds_isalnum(int nASCIIValue);
  513. int                sds_isalpha(int nASCIIValue);
  514. int                sds_iscntrl(int nASCIIValue);
  515. int                sds_isdigit(int nASCIIValue);
  516. int                sds_isgraph(int nASCIIValue);
  517. int                sds_islower(int nASCIIValue);
  518. int                sds_isprint(int nASCIIValue);
  519. int                sds_ispunct(int nASCIIValue);
  520. int                sds_isspace(int nASCIIValue);
  521. int                sds_isupper(int nASCIIValue);
  522. int                sds_isxdigit(int nASCIIValue);
  523.  
  524. int                sds_link(int nRSMsg);
  525. struct sds_resbuf *sds_loaded(void);
  526.  
  527. void              *sds_malloc(size_t sizeBytes);                        
  528. int                sds_menucmd(const char *szPartToDisplay);
  529. int                sds_menugroup(char *pMemuGroupName);
  530. int                sds_msize(void *pvBuffer); 
  531.  
  532. int                   sds_namedobjdict(sds_name nmDict);
  533. int                sds_nentsel(const char *szNEntMsg, sds_name nmEntity, sds_point ptEntPoint, sds_point ptECStoWCS[4], struct sds_resbuf **pprbNestBlkList);
  534. int                sds_nentselp(const char *szNEntMsg, sds_name nmEntity, sds_point ptEntPoint, int swUserPick, sds_matrix mxECStoWCS, struct sds_resbuf **pprbNestBlkList);
  535. struct sds_resbuf *sds_newrb(int nTypeOrDXF);
  536.  
  537. int                sds_osnap(const sds_point ptAperCtr, const char *szSnapModes, sds_point ptPoint);
  538.  
  539. void               sds_polar(const sds_point ptPolarCtr, double dAngle, double dDistance, sds_point ptPoint);
  540. int                sds_printf(const char *szPrintThis, ...);
  541. int                sds_progresspercent(int iPercentDone);    
  542. int                   sds_progressstart(void);    
  543. int                sds_progressstop(void);    
  544. int                sds_prompt(const char *szPromptMsg);
  545. int                sds_putsym(const char *szSymbol, struct sds_resbuf *prbSymbolInfo);
  546.  
  547. int                   sds_readaliasfile(char *szAliasFile);
  548. void              *sds_realloc(void *pOldMemLoc, size_t sizeBytes);    // TODO - Should return char*?
  549. int                sds_redraw(const sds_name nmEntity, int nHowToDraw);
  550. int                sds_regapp(const char *szApplication);
  551. int                sds_regappx(const char *szApplication, int swSaveAsR12); // I have no idea is 2nd param is right.
  552. int                sds_regfunc(int (*nFuncName)(void), int nFuncCode);    
  553. int                sds_relrb(struct sds_resbuf *prbReleaseThis);
  554. void               sds_relBlockTree(struct sds_blockTree *pTree);
  555. int                sds_retint(int nReturnInt);
  556. int                sds_retlist(const struct sds_resbuf *prbReturnList);
  557. int                sds_retname(const sds_name nmReturnName, int nReturnType);
  558. int                sds_retnil(void);
  559. int                sds_retpoint(const sds_point ptReturn3D);
  560. int                sds_retreal(double dReturnReal);
  561. int                sds_retstr(const char *szReturnString);
  562. int                sds_rett(void);
  563. int                sds_retval(const struct sds_resbuf *prbReturnValue);
  564. int                sds_retvoid(void);
  565. int                   sds_rp2pix(double dNumberX,double dNumberY,int *pPixelX,int *pPixelY);
  566. int                sds_rtos(double dNumber, int nUnitType, int nPrecision, char *szNumber);
  567.  
  568. int                sds_sendmessage(char *szCommandMsg);
  569. int                sds_setcallbackfunc(int (*cbfnptr)(int flag,void *arg1,void *arg2,void *arg3));
  570. int                sds_setfunhelp(char *szFunctionName, char *szHelpFile, char *szContextID, int nMapNumber);
  571. int                sds_setvar(const char *szSysVar, const struct sds_resbuf *prbVarInfo);
  572. int                sds_setview(const struct sds_resbuf *prbViews, int nWhichVPort); 
  573. int                sds_snvalid(const char *szTableName, int swAllowPipe);
  574. int                sds_ssadd(const sds_name nmEntToAdd, const sds_name nmSelSet, sds_name nmNewSet);
  575. int                sds_ssdel(const sds_name nmEntToDel, const sds_name nmSelSet);
  576. int                sds_ssfree(sds_name nmSetToFree);
  577. int                sds_ssget(const char *szSelMethod, const void *pFirstPoint, const void *pSecondPoint, const struct sds_resbuf *prbFilter, sds_name nmNewSet);    
  578. int                sds_ssgetfirst(struct sds_resbuf **pprbHaveGrips, struct sds_resbuf **pprbAreSelected);
  579. int                sds_sslength(const sds_name nmSelSet, long *plNumberOfEnts);
  580. int                sds_ssmemb(const sds_name nmEntity, const sds_name nmSelSet);
  581. int                sds_ssname(const sds_name nmSelSet, long lSetIndex, sds_name nmEntity);
  582. int                sds_ssnamex(struct sds_resbuf **pprbEntName, const sds_name nmSelSet, const long iIndex);
  583. int                sds_sssetfirst(const sds_name nmGiveGrips, const sds_name nmSelectThese);
  584. int                sds_swapscreen(void);
  585.  
  586. int                sds_tablet (const struct sds_resbuf *prbGetOrSet, struct sds_resbuf **pprbCalibration);
  587. struct sds_resbuf *sds_tblnext(const char *szTable, int swFirst);
  588. int                   sds_tblobjname(const char *szTable, const char *szEntInTable, sds_name nmEntName);
  589. struct sds_resbuf *sds_tblsearch(const char *szTable, const char *szFindThis, int swNextItem);
  590. int                sds_textbox(const struct sds_resbuf *prbTextEnt, sds_point ptCorner, sds_point ptOpposite);    
  591. int                sds_textpage(void);
  592. int                sds_textscr(void);
  593. int                sds_tolower(int nASCIIValue);
  594. int                sds_toupper(int nASCIIValue);
  595. int                sds_trans(const sds_point ptVectOrPtFrom, const struct sds_resbuf *prbCoordFrom, const struct sds_resbuf *prbCoordTo, int swVectOrDisp, sds_point ptVectOrPtTo);
  596.  
  597. int                   sds_ucs2rp(sds_point ptSour3D,sds_point ptDest3D);
  598. int                sds_update(int nWhichVPort,const sds_point ptCorner1,const sds_point ptCorner2);
  599. int                sds_undef(const char *szFuncName, int nFuncCode);
  600. int                sds_usrbrk(void);
  601.  
  602. int                sds_vports(struct sds_resbuf **prbViewSpecs);    
  603.  
  604. int                sds_wcmatch(const char *szCompareThis, const char *szToThis);
  605.  
  606. int                sds_xdroom(const sds_name nmEntity, long *plMemAvail);
  607. int                sds_xdsize(const struct sds_resbuf *prbEntData, long *plMemUsed);
  608. int                sds_xformss(const sds_name nmSetName, sds_matrix mxTransform);
  609. int                sds_xload(const char *szApplication);
  610. int                   sds_xref(char action,struct sds_resbuf *param);
  611. int                sds_xstrcase(char *szString);   // Not documented
  612. char              *sds_xstrsave(char *szSource, char **pszDest);   // Not documented
  613. int                sds_xunload(const char *szApplication); 
  614.  
  615.  
  616. //    These are used as arguments to sds_help.
  617. //    They match the Windows WinHelp definitons in WINUSER.H and are provided for convenience only.
  618. #define HELP_CONTENTS     0x0003L  /* display first topic */
  619. #define HELP_HELPONHELP   0x0004L  /* Display help on using help */
  620. #define HELP_PARTIALKEY   0x0105L  /* Display Search dialog */
  621.  
  622.  
  623. #if !defined(SDS_DONTUSEOURADS)
  624.  
  625.     #define SDS_USEOURDCL 1
  626.     
  627.     #define main           SDS_main
  628.     #define ads_main       SDS_main
  629.     #define acrxEntryPoint SDS_main
  630.  
  631.     #define  OL_GOOD         0
  632.     #define  OL_ESNVALID     1
  633.     #define  OL_ENAMEVALID   2
  634.     #define  OL_ESSMAX       3
  635.     #define  OL_ESSVALID     4
  636.     #define  OL_EBDEVALID    5
  637.     #define  OL_EXDEVALID    6
  638.     #define  OL_ENTSELPICK   7
  639.     #define  OL_EEOEF        8
  640.     #define  OL_EEOBD        9
  641.     #define  OL_EEMPDB      10
  642.     #define  OL_EDELVPORT   11
  643.     #define  OL_EACQPLINE   12
  644.     #define  OL_EHANDLE     13
  645.     #define  OL_ENOHAND     14
  646.     #define  OL_ETRANS      15
  647.     #define  OL_EXSPACE     16
  648.     #define  OL_EDELENT     17
  649.     #define  OL_ETBLNAME    18
  650.     #define  OL_ETBLARG     19
  651.     #define  OL_ERDONLY     20
  652.     #define  OL_ENONZERO    21
  653.     #define  OL_ERANGE      22
  654.     #define  OL_ERGBUSY     23
  655.     #define  OL_EMMTYPE     24
  656.     #define  OL_EMMLAY      25
  657.     #define  OL_EMMLT       26
  658.     #define  OL_EMMCOLOR    27
  659.     #define  OL_EMMSTYLE    28
  660.     #define  OL_EMMSHAPE    29
  661.     #define  OL_EMMFTYPE    30
  662.     #define  OL_EMODDEL     31
  663.     #define  OL_EMODSEQ     32
  664.     #define  OL_EMODHAND    33
  665.     #define  OL_EMODVPVIS   34
  666.     #define  OL_EMMLL       35
  667.     #define  OL_EMKTYPE     36
  668.     #define  OL_EMKPLINE    37
  669.     #define  OL_EMKCMPLX    38
  670.     #define  OL_EMKBNAME    39
  671.     #define  OL_EMKBFLAG    40
  672.     #define  OL_EMKDBNAME   41
  673.     #define  OL_EMKNORM     42
  674.     #define  OL_EMKNOBNM    43
  675.     #define  OL_EMKNOBFLG   44
  676.     #define  OL_EMKANON     45
  677.     #define  OL_EMKBLOCK    46
  678.     #define  OL_EMKMANDF    47
  679.     #define  OL_EMMXDTYPE   48
  680.     #define  OL_EMMXDNEST   49
  681.     #define  OL_EMMXDAPPID  50
  682.     #define  OL_EMMXDSIZE   51
  683.     #define  OL_ENTSELNULL  52
  684.     #define  OL_EMXDAPPID   53
  685.     #define  OL_EMMVPORT    54
  686.     #define  OL_INVEXT      55
  687.     #define  OL_EFLTR1      56
  688.     #define  OL_EFLTR2      57
  689.     #define  OL_EFLTR3      58
  690.     #define  OL_EFLTR4      59
  691.     #define  OL_EFLTR5      60
  692.     #define  OL_EFLTR6      61
  693.     #define  OL_EFLTR7      62
  694.     #define  OL_EFLTR8      63
  695.     #define  OL_EFLTR9      64
  696.     #define  OL_EFLTR10     65
  697.     #define  OL_EFLTR11     66
  698.     #define  OL_EFLTR12     67
  699.     #define  OL_TABNOT      68
  700.     #define  OL_TABNOCAL    69
  701.     #define  OL_TABERR      70
  702.     #define  OL_ENEWRB      71
  703.     #define  OL_ENULLPTR    72
  704.     #define  OL_EOPEN       73
  705.     #define  OL_ELOADED     74
  706.     #define  OL_EMAXAPP     75
  707.     #define  OL_EEXEC       76
  708.     #define  OL_EVERSION    77
  709.     #define  OL_EDENIED     78
  710.     #define  OL_EREFUSE     79
  711.     #define  OL_ENOTLOADED  80
  712.     #define  OL_ENOMEM      81
  713.     #define  OL_EXFMVALID   82
  714.     #define  OL_ESYMNAM     83
  715.     #define  OL_ESYMVAL     84
  716.     #define  OL_NONDIALOG   85
  717.  
  718.     /* Our additions (ACAD uses 0-100 currently): */
  719.  
  720.     #define  OL_EROPEN     501  /* Bad pathname or can't find/open. */
  721.     #define  OL_EWOPEN     502  /* Can't create DWG file. */
  722.     #define  OL_ESEEKREAD  503  /* fseek or fread error. */
  723.     #define  OL_EDWGVER    504  /* Not a DWG, or not a version we handle. */
  724.     #define  OL_EWALKING   505  /* Error walking the entities. */
  725.     #define  OL_ERDWGENT   506  /* Error reading a DWG entity. */
  726.     #define  OL_EBIGENT    507  /* Skipped ent that was too big for buffer. */
  727.     #define  OL_EDWGWRITE  508  /* fwrite error. */
  728.     #define  OL_ERNOTDWG   509  /* Appears not to be an AutoCAD drawing. */
  729.       /* These two are for entmakes where ACAD prints a message instead */
  730.       /* of setting ERRNO: */
  731.     #define  OL_EMKNESTBLK 510  /* "Cannot nest block definitions." */
  732.     #define  OL_EMKINVCOMP 511  /* "Invalid complex object." */
  733.  
  734.  
  735.     #define ads_pointp sds_pointp
  736.     #define ads_namep sds_namep
  737.  
  738.     #define ads_real sds_real
  739.     #define ads_point sds_point
  740.     #define ads_name sds_name
  741.     #define ads_matrix sds_matrix
  742.     #define ads_binary sds_binary
  743.     #define ads_u_val  sds_u_val
  744.     #define resbuf sds_resbuf
  745.  
  746.     #undef X
  747.     #undef Y
  748.     #undef Z
  749.     #undef T
  750.  
  751.     #define X SDS_X
  752.     #define Y SDS_Y
  753.     #define Z SDS_Z
  754.     #define T SDS_T
  755.  
  756.     #undef TRUE
  757.     #undef FALSE
  758.     
  759.     #define TRUE      SDS_TRUE          
  760.     #define FALSE     SDS_FALSE
  761.     
  762.     #define EOS       '\0'
  763.  
  764.     #if !defined(SDS_NOSETRCODES)
  765.  
  766.         #define RQSAVE    SDS_RQSAVE
  767.         #define RQEND     SDS_RQEND
  768.         #define RQQUIT    SDS_RQQUIT
  769.         #define RQCFG     SDS_RQCFG
  770.         #define RQXLOAD   SDS_RQXLOAD
  771.         #define RQXUNLD   SDS_RQXUNLD
  772.         #define RQHUP     SDS_RQHUP
  773.         #define RQXHELP   SDS_RQXHELP
  774.         #define RQSUBR    SDS_RQSUBR
  775.         #define RSRSLT    SDS_RSRSLT
  776.         #define RSERR     SDS_RSERR
  777.  
  778.          #define RTREJ     SDS_RTREJ
  779.         #define RTFAIL    SDS_RTFAIL
  780.  
  781.         #define PAUSE      SDS_PAUSE
  782.  
  783.         #define RSG_NONULL SDS_RSG_NONULL
  784.         #define RSG_NOZERO SDS_RSG_NOZERO
  785.         #define RSG_NONEG  SDS_RSG_NONEG
  786.         #define RSG_NOLIM  SDS_RSG_NOLIM
  787.         #define RSG_GETZ   SDS_RSG_GETZ
  788.         #define RSG_DASH   SDS_RSG_DASH
  789.         #define RSG_2D     SDS_RSG_2D
  790.         #define RSG_OTHER  SDS_RSG_OTHER
  791.  
  792.         #define RTNONE    SDS_RTNONE
  793.         #define RTREAL    SDS_RTREAL
  794.         #define RTPOINT   SDS_RTPOINT
  795.         #define RTSHORT   SDS_RTSHORT
  796.         #define RTANG     SDS_RTANG
  797.         #define RTSTR     SDS_RTSTR
  798.         #define RTENAME   SDS_RTENAME
  799.         #define RTPICKS   SDS_RTPICKS
  800.         #define RTORINT   SDS_RTORINT
  801.         #define RT3DPOINT SDS_RT3DPOINT
  802.         #define RTLONG    SDS_RTLONG
  803.         #define RTVOID    SDS_RTVOID
  804.         #define RTLB      SDS_RTLB
  805.         #define RTLE      SDS_RTLE
  806.         #define RTDOTE    SDS_RTDOTE
  807.         #define RTNIL     SDS_RTNIL
  808.         #define RTDXF0    SDS_RTDXF0
  809.         #define RTT       SDS_RTT
  810.         #define RTNORM    SDS_RTNORM
  811.         #define RTERROR   SDS_RTERROR
  812.         #define RTCAN     SDS_RTCAN
  813.         #define RTKWORD   SDS_RTKWORD
  814.         #define RTBINARY  SDS_RTBINARY 
  815.  
  816.     #endif /* !defined(SDS_NOSETRCODES) */
  817.  
  818.     #define ads_name_set      sds_name_set
  819.     #define ads_point_set     sds_point_set
  820.     #define ads_name_clear    sds_name_clear
  821.     #define ads_name_nil      sds_name_nil
  822.     #define ads_name_equal    sds_name_equal
  823.     #define ads_init          sds_init
  824.     #define ads_fail          sds_fail
  825.     #define ads_abort         sds_abort
  826.     #define ads_exit          sds_exit
  827.     #define ads_regfunc       sds_regfunc
  828.     #define ads_link          sds_link
  829.     #define ads_newrb         sds_newrb
  830.     #define ads_relrb         sds_relrb
  831.     #define ads_usrbrk        sds_usrbrk
  832.     #define ads_defun         sds_defun
  833.     #define ads_undef         sds_undef
  834.     #define ads_getfuncode    sds_getfuncode
  835.     #define ads_getargs       sds_getargs
  836.     #define ads_retlist       sds_retlist
  837.     #define ads_retval        sds_retval
  838.     #define ads_retpoint      sds_retpoint
  839.     #define ads_retstr        sds_retstr
  840.     #define ads_retname       sds_retname
  841.     #define ads_retint        sds_retint
  842.     #define ads_retreal       sds_retreal
  843.     #define ads_rett          sds_rett
  844.     #define ads_retnil        sds_retnil
  845.     #define ads_retvoid       sds_retvoid
  846.     #define ads_malloc          sds_malloc       
  847.     #define ads_free          sds_free         
  848.     #define ads_realloc          sds_realloc      
  849.     #define ads_calloc          sds_calloc       
  850.     #define ads_entdel        sds_entdel
  851.     #define ads_entgetx       sds_entgetx
  852.     #define ads_entget        sds_entget
  853.     #define ads_entlast       sds_entlast
  854.     #define ads_entnext       sds_entnext
  855.     #define ads_entupd        sds_entupd
  856.     #define ads_entmod        sds_entmod
  857.     #define ads_entmake       sds_entmake
  858.     #define ads_entmakex      sds_entmakex
  859.     #define ads_entsel        sds_entsel
  860.     #define ads_nentsel       sds_nentsel
  861.     #define ads_nentselp      sds_nentselp
  862.     #define ads_ssget         sds_ssget
  863.     #define ads_ssfree        sds_ssfree
  864.     #define ads_sslength      sds_sslength
  865.     #define ads_ssadd         sds_ssadd
  866.     #define ads_ssdel         sds_ssdel
  867.     #define ads_ssmemb        sds_ssmemb
  868.     #define ads_ssname        sds_ssname
  869.     #define ads_xdroom        sds_xdroom
  870.     #define ads_xdsize        sds_xdsize
  871.     #define ads_tblnext       sds_tblnext
  872.     #define ads_tblsearch     sds_tblsearch
  873.     #define ads_handent       sds_handent
  874.     #define ads_trans         sds_trans
  875.     #define ads_angtos        sds_angtos
  876.     #define ads_cvunit        sds_cvunit
  877.     #define ads_wcmatch       sds_wcmatch
  878.     #define ads_rtos          sds_rtos
  879.     #define ads_angtof        sds_angtof
  880.     #define ads_distof        sds_distof
  881.     #define ads_setvar        sds_setvar
  882.     #define ads_initget       sds_initget
  883.     #define ads_getsym        sds_getsym
  884.     #define ads_putsym        sds_putsym
  885.     #define ads_loaded        sds_loaded
  886.     #define ads_xload         sds_xload
  887.     #define ads_xunload       sds_xunload
  888.     #define ads_arxloaded     sds_arxloaded
  889.     #define ads_arxxload      sds_arxxload
  890.     #define ads_arxxunload    sds_arxxunload
  891.     #define ads_command       sds_command
  892.     #define ads_buildlist     sds_buildlist
  893.     #define ads_printf        sds_printf
  894.     #define ads_cmd           sds_cmd
  895.     #define ads_invoke        sds_invoke
  896.     #define ads_inters        sds_inters
  897.     #define ads_getvar        sds_getvar
  898.     #define ads_findfile      sds_findfile
  899.     #define ads_getstring     sds_getstring
  900.     #define ads_menucmd       sds_menucmd
  901.     #define ads_prompt        sds_prompt
  902.     #define ads_alert         sds_alert
  903.     #define ads_regapp        sds_regapp
  904.     #define ads_getappname    sds_getappname
  905.     #define ads_getangle      sds_getangle
  906.     #define ads_getcorner     sds_getcorner
  907.     #define ads_getdist       sds_getdist
  908.     #define ads_getorient     sds_getorient
  909.     #define ads_getpoint      sds_getpoint
  910.     #define ads_getint        sds_getint
  911.     #define ads_getkword      sds_getkword
  912.     #define ads_getreal       sds_getreal
  913.     #define ads_getinput      sds_getinput
  914.     #define ads_vports        sds_vports
  915.     #define ads_textscr       sds_textscr
  916.     #define ads_graphscr      sds_graphscr
  917.     #define ads_textpage      sds_textpage
  918.     #define ads_grclear       sds_grclear
  919.     #define ads_redraw        sds_redraw
  920.     #define ads_osnap         sds_osnap
  921.     #define ads_grread        sds_grread
  922.     #define ads_grtext        sds_grtext
  923.     #define ads_grdraw        sds_grdraw
  924.     #define ads_grvecs        sds_grvecs
  925.     #define ads_xformss       sds_xformss
  926.     #define ads_draggen       sds_draggen
  927.     #define ads_angle         sds_angle
  928.     #define ads_distance      sds_distance
  929.     #define ads_polar         sds_polar
  930.     #define ads_getfiled      sds_getfiled
  931.     #define ads_textbox       sds_textbox
  932.     #define ads_tablet        sds_tablet
  933.     #define ads_isalpha       sds_isalpha
  934.     #define ads_isupper       sds_isupper
  935.     #define ads_islower       sds_islower
  936.     #define ads_isdigit       sds_isdigit
  937.     #define ads_isxdigit      sds_isxdigit
  938.     #define ads_isspace       sds_isspace
  939.     #define ads_ispunct       sds_ispunct
  940.     #define ads_isalnum       sds_isalnum
  941.     #define ads_isprint       sds_isprint
  942.     #define ads_isgraph       sds_isgraph
  943.     #define ads_iscntrl       sds_iscntrl
  944.     #define ads_toupper       sds_toupper
  945.     #define ads_tolower       sds_tolower
  946.     #define ads_agetenv          sds_agetenv     
  947.     #define ads_asetenv          sds_asetenv     
  948.     #define ads_agetcfg          sds_agetcfg     
  949.     #define ads_asetcfg          sds_asetcfg     
  950.     #define ads_namedobjdict  sds_namedobjdict
  951.     #define ads_dictsearch      sds_dictsearch  
  952.     #define ads_dictnext      sds_dictnext    
  953.     #define ads_tblobjname      sds_tblobjname  
  954.     #define ads_getcname      sds_getcname    
  955.     #define ads_help          sds_help        
  956.     #define ads_regappx          sds_regappx     
  957.     #define ads_setfunhelp      sds_setfunhelp  
  958.     #define ads_setview          sds_setview     
  959.     #define ads_snvalid          sds_snvalid     
  960.     #define ads_ssgetfirst      sds_ssgetfirst  
  961.     #define ads_sssetfirst      sds_sssetfirst  
  962.     #define ads_ssnamex          sds_ssnamex     
  963.     #define ads__msize          sds__msize      
  964.     #define ads_xstrsave      sds_xstrsave    
  965.     #define ads_strdup          sds_xstrsave    
  966.     #define ads_xstrcase      sds_xstrcase    
  967.     #define adsw_acadMainWnd  sds_getmainhwnd    
  968.     #define ads_update        sds_update    
  969.      
  970.     #define SDS_DLLEXPORT __declspec(dllexport)
  971.  
  972.     #ifdef _WINDOWS_ 
  973.     #define    ENTRYARG    HWND
  974.     #else
  975.     #define    ENTRYARG
  976.     #endif
  977.     void SDS_DLLEXPORT SDS_EntryPoint( ENTRYARG);
  978.  
  979. #endif  /* SDS_DONTUSEOURADS */
  980.  
  981. // The following naming convention is being used here for variables in the prototypes:     (Mostly from "Programming Windows, by Charles Petzold)
  982. //
  983. //_Abbrev____Type_______________Example:__________________________________________________________________________________________________________
  984. //
  985. //        n -- Int or Short        int nRType                
  986. //        d -- Double                double dAngle
  987. //        l -- Long                long lSetIndex
  988. //        h -- Handle                sds_hdlg hDialog
  989. //        p -- Pointer            const void *pFirstPoint   (also, combines with any other, such as: double *pdRadians)
  990. //________________________________________________________________________________________________________________________________________________
  991.  
  992. /* Below is all of our DCL stuff. */
  993. int dlg_new_dialog(char *szDialogName,int nDialogFileID,void *pfnDef_Callback,sds_hdlg *hDialog);
  994. int dlg_load_dialog(char *szFileToLoad,int *nDialogFileID);
  995. int dlg_unload_dialog(int nDialogFileID);
  996. int dlg_start_dialog(sds_hdlg hDialog, int *nMessage);
  997. int dlg_done_dialog(sds_hdlg hDialog,long nMessage);
  998. int dlg_new_positioned_dialog(char *szDialogName, int nDialogFileID, void *pfnDef_Callback, int nXPos, int nYPos, sds_hdlg *hDialog);
  999. int dlg_done_positioned_dialog(sds_hdlg hDialog, int nMessage, int *nXPos, int *nYPos);
  1000. int dlg_term_dialog(void);
  1001.  
  1002. int dlg_start_list(sds_hdlg hDialog,char *szControlKey, int nChangeAddNew,int nWhichItem);
  1003. int dlg_add_list(char *szAddToList);
  1004. int dlg_get_list_string(sds_hdlg hDialog, char *szControlKey, char *szListString, int nStringLength, int nWhichItem);
  1005. int dlg_end_list(void);
  1006.  
  1007. int dlg_get_attr(sds_hdlg hDialog, char *szControlKey, char *szAttribName, char *szAttribInfo, int lInfoMaxLength);
  1008. int dlg_get_attr_string(sds_htile hControl,char *szAttribName, char *szAttribInfo, long lInfoMaxLength);
  1009.  
  1010. int dlg_get_tile(sds_hdlg hDialog,char *szControlKey,char *szControlInfo,long lInfoMaxLength);
  1011. int dlg_action_tile(sds_hdlg hDialog,char *szControlKey,void *pfnControlFunc);
  1012. int dlg_client_data_tile(sds_hdlg hDialog, char *szControlKey, void *pApplicationData);
  1013. int dlg_dimensions_tile(sds_hdlg hDialog, char *szControlKey, short *nWidthLess1, short *nHeightLess1);
  1014. int dlg_mode_tile(sds_hdlg hDialog, char *szControlKey, int nTileState);
  1015. int dlg_set_tile(sds_hdlg hDialog, char *szControlKey, char *szControlInfo);
  1016.  
  1017. int dlg_start_image(sds_hdlg hDialog, char *szControlKey);
  1018. int dlg_fill_image(int nULCornerX, int nULCornerY, int nWidthLess1, int nHeightLess1, int nColor);
  1019. int dlg_slide_image(int nULCornerX, int nULCornerY, int nWidthLess1, int nHeightLess1, char *szSnapshotName);
  1020. int dlg_vector_image(int nXVectStart, int nYVectStart, int nXVectEnd, int nYVectEnd, int nColor);
  1021. int dlg_end_image(void);
  1022.  
  1023.  
  1024. #if defined(SDS_USEOURDCL)
  1025.  
  1026.     #undef  CALLB
  1027.     #define CALLB  
  1028.  
  1029.     #define ads_hdlg sds_hdlg
  1030.     #define ads_htile sds_htile
  1031.     #define ads_callback_packet sds_callback_packet
  1032.  
  1033.     #ifdef __cplusplus
  1034.         typedef void (*CLIENTFUNC) (sds_callback_packet *cpkt);
  1035.     #else
  1036.         #define CLIENTFUNC void *
  1037.     #endif
  1038.  
  1039.     #define SDS_NULLCB ((CLIENTFUNC)0)
  1040.  
  1041.     #define NULLCB           SDS_NULLCB
  1042.  
  1043.     #define CBR_SELECT       SDS_CBR_SELECT
  1044.     #define CBR_LOST_FOCUS   SDS_CBR_LOST_FOCUS
  1045.     #define CBR_DRAG         SDS_CBR_DRAG
  1046.     #define CBR_DOUBLE_CLICK SDS_CBR_DOUBLE_CLICK
  1047.  
  1048.     #define DLGCANCEL     SDS_DLGCANCEL
  1049.     #define DLGOK         SDS_DLGOK
  1050.     #define DLGALLDONE    SDS_DLGALLDONE
  1051.  
  1052.     #define DLGSTATUS     SDS_DLGSTATUS
  1053.  
  1054.     #define BGLCOLOR      SDS_BGLCOLOR   
  1055.     #define DBGLCOLOR     SDS_DBGLCOLOR   
  1056.     #define DFGLCOLOR     SDS_DFGLCOLOR   
  1057.     #define LINELCOLOR     SDS_LINELCOLOR   
  1058.  
  1059.     #define LIST_CHANGE   SDS_LIST_CHANGE
  1060.     #define LIST_APPEND   SDS_LIST_APPEND
  1061.     #define LIST_NEW      SDS_LIST_NEW
  1062.  
  1063.     #define MODE_ENABLE   SDS_MODE_ENABLE
  1064.     #define MODE_DISABLE  SDS_MODE_DISABLE
  1065.     #define MODE_SETFOCUS SDS_MODE_SETFOCUS
  1066.     #define MODE_SETSEL   SDS_MODE_SETSEL
  1067.     #define MODE_FLIP     SDS_MODE_FLIP
  1068.  
  1069.     #define MAX_TILE_STR   SDS_MAX_TILE_STR 
  1070.     #define TILE_STR_LIMIT SDS_TILE_STR_LIMIT       
  1071.  
  1072.  
  1073.     #define ads_load_dialog            dlg_load_dialog
  1074.     #define ads_unload_dialog          dlg_unload_dialog
  1075.     #define ads_new_dialog             dlg_new_dialog
  1076.     #define ads_new_positioned_dialog  dlg_new_positioned_dialog
  1077.     #define ads_start_dialog           dlg_start_dialog
  1078.     #define ads_term_dialog            dlg_term_dialog
  1079.     #define ads_action_tile            dlg_action_tile
  1080.     #define ads_done_dialog            dlg_done_dialog
  1081.     #define ads_done_positioned_dialog dlg_done_positioned_dialog
  1082.     #define ads_set_tile               dlg_set_tile
  1083.     #define ads_client_data_tile       dlg_client_data_tile
  1084.     #define ads_get_tile               dlg_get_tile
  1085.     #define ads_get_attr               dlg_get_attr
  1086.     #define ads_get_attr_string        dlg_get_attr_string
  1087.     #define ads_start_list             dlg_start_list
  1088.     #define ads_add_list               dlg_add_list
  1089.     #define ads_end_list               dlg_end_list
  1090.     #define ads_mode_tile              dlg_mode_tile
  1091.     #define ads_dimensions_tile        dlg_dimensions_tile
  1092.     #define ads_start_image            dlg_start_image
  1093.     #define ads_vector_image           dlg_vector_image
  1094.     #define ads_fill_image             dlg_fill_image
  1095.     #define ads_slide_image            dlg_slide_image
  1096.     #define ads_end_image              dlg_end_image
  1097.     #define ads_get_list_string        dlg_get_list_string
  1098.  
  1099. #endif /* SDS_USEOURDCL */
  1100.  
  1101. #if defined(__cplusplus)
  1102.     }
  1103. #endif
  1104.  
  1105. #endif // _SDS_H
  1106.